@import "./commonFun.less";

:root {
  .common-page {
    width: 100%;
    height: 100%;

    //解决点击合同名称，出现抽屉，页面闪动
    .drawer-flashing {
      overflow: hidden;
    }

    .page-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 50px;
      padding: 0 16px;

      .page-title {
        font-size: 16px;
        font-weight: bold;
        // color: var(--normalColor);
      }
    }

    .header-operate() {
      min-height: 64px;
      height: auto;
      display: flex;
      justify-content: space-between;
      // align-items: center;
      padding: 16px;
      flex: none;
      background-color: #fff;

      .operate-box {
        flex-wrap: nowrap;
      }

      .with-info {
        height: 60px;
      }
    }

    .search-header {
      background-color: #fff;
      position: relative;
      .header-operate();

      .search-item {
        display: flex;
        align-items: center;

        .search-label {
          flex: none;
          color: var(--formLabelColor);
          margin-right: 8px;
        }

        .search-content {
          flex: auto;
        }
      }

      &:not(.no-bottom-border)::after {
        content: "";
        position: absolute;
        width: calc(100% - 32px);
        left: 16px;
        bottom: 0;
        height: 1px;
        border-bottom: 1px solid #f2f3f5;
      }
    }

    .page-sider {
      background-color: #fff;
      border-right: 1px solid var(--borderColor);

      .ant-layout-sider-children {
        display: flex;
        flex-direction: column;
      }

      .sider-header {
        .header-operate();
        // padding-right: 0;

        .sider-title {
          color: var(--normalColor);
          // font-weight: bold;
          line-height: 32px;
          font-weight: bold;
        }
      }

      .sider-box {
        flex: auto;
        // overflow: hidden;
        padding: 0 16px 8px 16px;
        height: 100%;
        overflow: auto;

        .ant-tree-node-icon {
          width: 20px;
          height: 20px;
        }

        &.with-bottom-padding {
          padding-bottom: 16px;
        }

        &.with-top-padding {
          padding-top: 16px;
        }
      }

      // 没有右边边框和padding
      &.no-left-border {
        border-right: none;

        .sider-header {
          padding-right: 0;
        }

        .sider-box {
          padding-right: 0;
        }
      }
    }

    .page-content {
      display: flex;
      background-color: #fff;
      flex-direction: column;

      .content-header {
        .header-operate();
        // align-items: center;

        .content-title {
          color: var(--normalColor);
          font-weight: bold;
          line-height: 32px;
        }

        .ant-btn + .ant-btn {
          margin-left: 8px;
        }
      }

      .content-box {
        background-color: #fff;
        width: 100%;
        flex: auto;
        padding: 0 16px 16px 16px;
        overflow: hidden;

        .operate-col {
          .ant-btn-text {
            height: 20px;
          }

          .ant-btn + .ant-btn {
            margin-left: 16px;
          }
        }

        .status-col {
          justify-content: center;
          align-items: center;
          height: 100%;
        }

        &.with-top-padding {
          padding-top: 16px;
        }

        &.scroll {
          overflow: auto;
        }
      }

      .table-box {
        position: relative;
      }

      .content-footer {
        padding: 0 16px 16px 16px;
      }
    }

    .page-footer {
      background-color: #fff;
      flex: none;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      height: 60px;
      padding: 0 32px;
      box-shadow: 0px -4px 20px 0px rgba(0, 0, 0, 0.05);
      border-top: 1px solid var(--borderColor);
    }

    // header下面是tab切换的页面
    &.with-tab {
      .common-page-tabs {
        & > .ant-tabs-nav {
          margin-bottom: 0;

          &::before {
            // content: none;
          }

          & > .ant-tabs-nav-wrap {
            padding: 0 16px;
          }
        }
      }
    }

    .page-content-box {
      padding: 16px;
      width: 100%;
      height: 100%;
      background-color: var(--colorFill1);
    }
  }
}
